/*
 * XML Type:  AccountInfoResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.AccountInfoResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML AccountInfoResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class AccountInfoResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.AccountInfoResponse
{
    
    public AccountInfoResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName DTACCTUP$0 = 
        new javax.xml.namespace.QName("", "DTACCTUP");
    private static final javax.xml.namespace.QName ACCTINFO$2 = 
        new javax.xml.namespace.QName("", "ACCTINFO");
    
    
    /**
     * Gets the "DTACCTUP" element
     */
    public java.lang.String getDTACCTUP()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTACCTUP$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DTACCTUP" element
     */
    public net.ofx.types.x2003.x04.DateTimeType xgetDTACCTUP()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTACCTUP$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "DTACCTUP" element
     */
    public void setDTACCTUP(java.lang.String dtacctup)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DTACCTUP$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DTACCTUP$0);
            }
            target.setStringValue(dtacctup);
        }
    }
    
    /**
     * Sets (as xml) the "DTACCTUP" element
     */
    public void xsetDTACCTUP(net.ofx.types.x2003.x04.DateTimeType dtacctup)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DateTimeType target = null;
            target = (net.ofx.types.x2003.x04.DateTimeType)get_store().find_element_user(DTACCTUP$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.DateTimeType)get_store().add_element_user(DTACCTUP$0);
            }
            target.set(dtacctup);
        }
    }
    
    /**
     * Gets array of all "ACCTINFO" elements
     */
    public net.ofx.types.x2003.x04.AccountInfo[] getACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(ACCTINFO$2, targetList);
            net.ofx.types.x2003.x04.AccountInfo[] result = new net.ofx.types.x2003.x04.AccountInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "ACCTINFO" element
     */
    public net.ofx.types.x2003.x04.AccountInfo getACCTINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountInfo target = null;
            target = (net.ofx.types.x2003.x04.AccountInfo)get_store().find_element_user(ACCTINFO$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "ACCTINFO" element
     */
    public int sizeOfACCTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(ACCTINFO$2);
        }
    }
    
    /**
     * Sets array of all "ACCTINFO" element
     */
    public void setACCTINFOArray(net.ofx.types.x2003.x04.AccountInfo[] acctinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(acctinfoArray, ACCTINFO$2);
        }
    }
    
    /**
     * Sets ith "ACCTINFO" element
     */
    public void setACCTINFOArray(int i, net.ofx.types.x2003.x04.AccountInfo acctinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountInfo target = null;
            target = (net.ofx.types.x2003.x04.AccountInfo)get_store().find_element_user(ACCTINFO$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(acctinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "ACCTINFO" element
     */
    public net.ofx.types.x2003.x04.AccountInfo insertNewACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountInfo target = null;
            target = (net.ofx.types.x2003.x04.AccountInfo)get_store().insert_element_user(ACCTINFO$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "ACCTINFO" element
     */
    public net.ofx.types.x2003.x04.AccountInfo addNewACCTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AccountInfo target = null;
            target = (net.ofx.types.x2003.x04.AccountInfo)get_store().add_element_user(ACCTINFO$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "ACCTINFO" element
     */
    public void removeACCTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(ACCTINFO$2, i);
        }
    }
}
